from django.urls import path
from home.views import *
"""
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwibmFtZSI6Ilx1OTdlOVx1NjY1M1x1ODU0YSJ9.ZzdcieHu4VpMksuI2zKRPJz9xLTtvcaFefSqx3DJP7Y
"""


urlpatterns = [
    # 获取所有用户信息
    path("systemusers/", UserView.as_view({"get": "user_list"})),

    # 查询
    path("search/", UserView.as_view({"get": "searchs"})),

    # 修改 获取用户个人信息
    path("reviseuser/<int:pk>/", UserView.as_view({"put": "upuser", "get": "user_info"})),

    # 8.29
    # 获取登录日志
    path("loginlogs/", LogsView.as_view({"get": "logs_list"})),

    # 搜索登录日志
    path("loginsearch/", LogsView.as_view({"get": "search"})),

    # 获取所有部门 和添加部门
    path("departments/", DeptView.as_view({"get": "dept_list", "post": "dept_add"})),

    # 删除 修改 获取单个 部门
    path("resivesector/<int:pk>/", DeptView.as_view({"delete": "dept_del", "put": "dept_update", "get": "dept_single"})),

    # 搜索部门
    path("departmentsearch/", DeptView.as_view({"get": "dept_search"})),

    # 获取所有职级和新增职级
    path("ranks/", RankView.as_view({"get": "rank_list", "post": "rank_add"})),

    # 删除 修改 获取单个职级
    path("reviserank/<int:pk>/", RankView.as_view({"get": "rank_single", "put": "rank_update", "delete": "rank_delete"})),

    # 搜索职级
    path("ranksearch/", RankView.as_view({"get": "rank_search"})),

    # 获取所有职位和新增部门
    path("managements/", PositionView.as_view({"get": "position_user", "post": "position_add"})),

    # 删除 修改 获取单个职位
    path("resivement/<int:pk>/", PositionView.as_view({"get": "position_single", "put": "position_update", "delete": "position_delete"})),

    # 搜索职位
    path("jobsearch/", PositionView.as_view({"get": "position_search"})),


    # 8.30
    # 获取员工生日数据
    path("birthdays/", HomeView.as_view({"get": "user_birthday"})),

    # 获取员工地区
    path("area/", HomeView.as_view({"get": "user_area"})),

    # 获取员工数据
    path("empdats/", HomeView.as_view({"get": "user_list"})),

    # 获取待办事项
    path("todos/", HomeView.as_view({"get": "todos_list"})),

    # 获取操作日志
    path("operatelogs/", ULogView.as_view({"get": "ulog_list"})),

    # 搜索操作日志
    path("operateserch/", ULogView.as_view({"get": "search"})),

    # 获取 添加 所有菜单
    path("menus/", MenuView.as_view({"get": "menu_list", "post": "menu_add"})),

    # 删除 修改 获取单个菜单
    path("revisemenu/<int:pk>/", MenuView.as_view({"get": "menu_info", "put": "menu_update", "delete": "menu_delete"})),

    # 搜索菜单
    path("menu_search/", MenuView.as_view({"get": "menu_search"})),

    # 七牛云
    path("qiniuyun/", UserView.as_view({"get": "qiniuyun"})),

    # 8.31
    # 获取全部角色 添加角色
    path("roles/", RoleView.as_view({"get": "role_list", "post": "role_add"})),

    # 修改 删除 获取单个角色
    path("reviserole/<int:pk>/", RoleView.as_view({"get": "role_info", "put": "role_update", "delete": "role_delete"})),

    # 搜索角色
    path("rolesearch/", RoleView.as_view({"get": "rolesearch"})),

    # 获取全部权限
    path("permissions/", PermissionView.as_view({"get": "list"})),

    # 推荐账号
    path("nominate/", UserView.as_view({"post": "nominate_account"})),

]





